// 模拟数据 用户信息
const userData = {
    userName: '张三',
    age: 18
}

// 商品列表信息
const proList = [
    {
        name: '衣服',
        price: '$39.9'
    },{
        name: '裤子',
        price: '$49.9'
    },{
        name: '鞋子',
        price: '$29.9'
    }
]


const initState = {}

export function rootReducer(state = initState, action) {
    // console.log(action);
    switch (action.type) {
        case 'get_users':
            return {
                ...userData
            };
        case 'get_proList':
            return {
                proList: [...proList]
            };
        default:
            return state;
    }
    
}